package com.dgw.springbootmail.config;

import com.dgw.springbootmail.intercepter.myIntercepter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @program: springboot-sendmail
 * @description:
 * @author: Mr.Dai
 * @create: 2020-02-29 22:33
 **/
@Configuration
public class applicationConfig implements WebMvcConfigurer {

    @Autowired
    private myIntercepter myIntercepter;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(myIntercepter);
    }
}
